package main

import "fmt"

type Student struct {
	Name string
	Age  int
}

func SetAge(info Student, age int) Student {
	info.Age = age
	return info
}

func SetAge1(info *Student, age int) {
	info.Age = age
}

func main() {
	s := Student{
		Name: "枫枫",
		Age:  21,
	}
	fmt.Println(s.Age)
	a := SetAge(s, 18)
	fmt.Println("a %v", a.Age)
	fmt.Println("s %v", s.Age)
	SetAge1(&s, 17)
	fmt.Println("s %v", s.Age)

}
